package com.weixstudio.designmode.builder.simple;

/**
 * @ClassName Director
 * @Description 指挥者
 * @Author liangw
 * @Date 2022/4/25 22:20
 * @Version 1.0
 **/
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public void setBuilder(Builder builder){
        this.builder = builder;
    }

    public  Product construct(){
        builder.buildPartA();
        builder.buildPartB();
        builder.buildPartC();
        return  builder.getResult();
    }
}
